<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>不老健康下载</title>
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="materialize/css/materialize.min.css" media="screen,projection" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="assets/css/style.css" rel="stylesheet" />

    <style>

        html, body, .home-page {
            height: 100%;
        }

        .page-wrapper {
            background: #8bc34a;
            width: 100%;
            padding-top: 150px;
            text-align: center;
        }


        .page-wrapper .qr-wrapper {
            width: 214px;
            height: 214px;
            padding: 7px;
            background: white;
            margin: 0 auto;
        }

        .page-wrapper .download-tip {
            color:  white;
        }


        .platform {
            margin-top: 10px;
            font-size: 18px;
            color: white;
        }

        .platform img {
            width: 20px;
            height: 20px;
        }

        .platform span {
            margin-left: 2px;
        }

        .platform>span:last-child {
            margin-left: 15px;
        }

        .page-wrapper .btn-download {
            width: 200px;
            padding: 10px 0;
            text-align: center;
            background: white;
            border-radius: 44px;
            margin: 50px auto 0;
            font-size: 18px;
        }

        .page-wrapper .btn-download:hover {
            cursor: pointer;
        }

        .hide-from-desktop img {
            width: 140px;
            margin-bottom: 60px;
            margin-top: 80px;
        }

        .hide-from-desktop div {
            font-size: 20px;
            color: white;
        }

    </style>

</head>
<body>
<div id="wrapper" class="home-page">
    <!-- start header -->
    <header class="hide-from-mobile">
        <div class="navbar navbar-default navbar-static-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="index.html"><img alt="logo" src="assets/images/logo.png"><span>杭州常青树生物科技有限公司</span></a>
                </div>

                <div class="navbar-collapse collapse ">
                    <ul class="nav navbar-nav">
                        <li><a class="waves-effect waves-dark" href="index.html">首页</a></li>
<!--                        <li class="dropdown">-->
<!--                            <a href="#" data-toggle="dropdown" class="dropdown-toggle waves-effect waves-dark">About Us <b class="caret"></b></a>-->
<!--                            <ul class="dropdown-menu">-->
<!--                                <li><a class="waves-effect waves-dark" href="../about.html">Company</a></li>-->
<!--                                <li><a class="waves-effect waves-dark" href="#">Our Team</a></li>-->
<!--                                <li><a class="waves-effect waves-dark" href="#">News</a></li>-->
<!--                                <li><a class="waves-effect waves-dark" href="#">Investors</a></li>-->
<!--                            </ul>-->
<!--                        </li>-->
<!--                        <li><a class="waves-effect waves-dark" href="../services.html">Services</a></li>-->
<!--                        <li><a class="waves-effect waves-dark" href="../portfolio.html">Gallery</a></li>-->
<!--                        <li><a class="waves-effect waves-dark" href="../pricing.html">Pricing</a></li>-->
                        <li class="active"><a class="waves-effect waves-dark" href="app_download.html">APP下载</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </header>

    <section class="page-wrapper">
        <div class="hide-from-desktop">
            <div>不老健康APP下载</div>
            <img src="https://i.loli.net/2020/01/09/nHyGJAz5vo19KO6.png">
        </div>


        <div class="hide-from-mobile">
            <div class="qr-wrapper">
                <div id="qrcode"></div>
            </div>
            <span class="download-tip">使用手机扫描二维码下载</span>
        </div>
        <div class="platform">
            <span><img alt="android" src="assets/images/android.png"><span>Android</span></span>
            <span><img alt="ios" src="assets/images/ios.png"><span>iPhone</span></span>
        </div>

        <div class="btn-download hide-from-desktop" onclick="downloadApp()"><strong>立即下载</strong></div>

    </section>


    <footer class="hide-from-mobile">
        <div class="container">
            <div class="row">
                <div class="col-lg-6git">
                    <div class="widget">
                        <h5 class="widgetheading">联系我们</h5>
                        <p>
                            浙江省杭州市西湖区文三路478号华星时代广场A座16层1602室，310012 <br>
                            0571-89980007 <br>
                        </p>
                        <p><a href="privacy_policy.html" target="_blank">隐私政策</a></p>
                    </div>
                </div>
                <!--			<div class="col-lg-4">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Quick Links</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Latest Events</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Terms and conditions</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Privacy policy</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Career</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Contact us</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
                <!--			<div class="col-lg-3">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Latest posts</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Pellentesque et pulvinar enim. Quisque at tempor ligula</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Natus error sit voluptatem accusantium doloremque</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
                <!--			<div class="col-lg-3">-->
                <!--				<div class="widget">-->
                <!--					<h5 class="widgetheading">Recent News</h5>-->
                <!--					<ul class="link-list">-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Pellentesque et pulvinar enim. Quisque at tempor ligula</a></li>-->
                <!--						<li><a class="waves-effect waves-dark" href="#">Natus error sit voluptatem accusantium doloremque</a></li>-->
                <!--					</ul>-->
                <!--				</div>-->
                <!--			</div>-->
            </div>
        </div>
        <div id="sub-footer">
            <div class="container">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="copyright">
                            <p>
                                Copyright &copy; 2019 <a target="_blank" href="#">杭州常青树生物科技有限公司</a> All rights reserved.
                                <a target="_blank" href="http://www.beian.miit.gov.cn">浙ICP备19049239号</a>
                            </p>
                        </div>
                    </div>
                    <!--				<div class="col-lg-6">-->
                    <!--					<ul class="social-network">-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Facebook"><i class="fa fa-facebook"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Twitter"><i class="fa fa-twitter"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Linkedin"><i class="fa fa-linkedin"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Pinterest"><i class="fa fa-pinterest"></i></a></li>-->
                    <!--						<li><a class="waves-effect waves-dark" href="#" data-placement="top" title="Google plus"><i class="fa fa-google-plus"></i></a></li>-->
                    <!--					</ul>-->
                    <!--				</div>-->
                </div>
            </div>
        </div>
    </footer>
</div>

<!-- go to top -->
<a href="#" class="scrollup waves-effect waves-dark hide-from-mobile"><i class="fa fa-angle-up active"></i></a>
<!-- javascript
    ================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script type="text/javascript" src="assets/js/jquery.js"></script>
<script type="text/javascript" src="assets/js/bootstrap.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.qrcode.js"></script>

<script>
    const isMobile = /Android|webOS|iPhone|iPod|iPad/i.test(navigator.userAgent);
    window.onload = function () {

        if (isMobile) {
            $('.download-tip').hide();
            $('.hide-from-mobile').hide();
            $('.page-wrapper').css('height', '100%');
            $('.page-wrapper').css('padding-top', '40px');
            return;
        }

        jQuery("#qrcode").qrcode({
            text : window.location.href,    //扫描二维码后显示的内容,可以直接填一个网址，扫描二维码后自动跳向该链接
            width : 200,               //二维码的宽度
            height : 200,              //二维码的高度
            src: 'assets/images/logo-1.png',
            imgWidth: 45,
            imgHeight: 45
        });
        $('.page-wrapper').css('height', '650px');
        $('.hide-from-desktop').hide();
        $('.platform>span').css('cursor', 'pointer');
        $('.platform>span:first-child').attr('onclick', 'openDownloadUrl(2)');
        $('.platform>span:last-child').attr('onclick', 'openDownloadUrl(1)');
    };


    function downloadApp() {
        if(!isMobile) {
            alert("请使用手机扫描二维码");
            return;
        }

        if (/Android/i.test(navigator.userAgent)) {
            openDownloadUrl(2);
        }else if(/iPhone|iPod|iPad/i.test(navigator.userAgent)) {
            openDownloadUrl(1);
        }else  {
            openDownloadUrl();
        }
    }


    function openDownloadUrl(type) {
        if (type === 1) {
            const url = "https://apps.apple.com/cn/app/%E4%B8%8D%E8%80%81%E5%81%A5%E5%BA%B7/id1491295200?l=zh&ls=1";
            window.open(url)
        }else if (type === 2){
            const url = "http://m.pp.cn/detail.html?appid=8092064&ch_src=pp_dev&ch=default";
            window.open(url);
        }else {
            alert("暂不提供下载");
        }
    }

</script>
</body>
</html>